<?php
if ( !defined( "IN_UCHOME" ) ) exit( "Access Denied" );
checklogin();
require('class.modify.php');
$mod = new modify($uid);
if(isset($_POST['myFormAc']) && $_POST['myFormAc'] == 'update'){
	$eventid = $mod->get_request();

	$param['type'] = 'join';
	$param['id'] = $eventid;
	$param['is_pass'] = 1;
	$param['uid'] = $uid;
	$param['username'] = $_SGLOBAL['supe_username'];
	$param['status'] = 0;
	$param['is_pass'] = 1;
	inserttable('app_action_join', $param, 0, true);

	$mod->error('你的操作已经生效', 'action.php?ac=show&id=' . $eventid, 1, 1);
}else{

	$start = createDate(0);
	$end = createDate(1);
	realname_get();
	include_once( template( "action/view/add" ) );
}

function createDate($type = 0)
{
	$temp = date('Y-n-j-G-i', time() + $type == 0 ? 3600*24*2 : 3600*24*3);
	$start = explode('-', $temp);
	if(substr($start[4], 0, 1) == 0) $start[4] = substr($start[4], 1, 1);
	return $start;
}
?>